package com.yqya.alibaba.nacos.config.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

/**
 * 测试示例
 *
 * @author Kevin
 * @date 2019-07-18
 */
@Slf4j
@RestController
@RefreshScope
public class TestController {

    /**
     * 配置文件中属性名称
     */
    @Value("${yqya.name:}")
    private String name;

    @GetMapping("/hello")
    public String hello() {
        return "hello, " + name;
    }

}
